package com.example.kotlin_smart_park

import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.CountDownTimer
import android.widget.TextView

class WelcomeActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_welcome)
        val time=object : CountDownTimer(5000,1000){
            override fun onTick(p0: Long) {
                findViewById<TextView>(R.id.timer).setText("${p0/1000}s")
            }

            override fun onFinish() {
                //ARouter.getInstance().build("/module_main/mainActivity").navigation()
            }
        }.start()
        findViewById<TextView>(R.id.jumpToMain).setOnClickListener {
            time.cancel()
            //ARouter.getInstance().build("/module_main/mainActivity").navigation()
            finish()
        }
    }

}